#include "osal/osal.h"
#include "utils/debug/art_assert.h"
#include "utils/debug/log.h"

static OS_Thread_t g_usr_app_thread;
static OS_Thread_t g_temp_cal_thread;
#define USR_APP_TASK_STACK_SIZE    6*256 //Byte
#define TEMP_APP_TASK_STACK_SIZE   6*256 //Byte

    
void usr_app_task_entry(void *params)
{
    uint32_t count = 0;
    
    while(1)
    {
        LOG(LOG_LVL_ERROR, "usr task count = %d\r\n", count++);

        OS_MsDelay(1000);
    }
}

void temp_cal_app_task_entry(void *params)
{
    uint32_t count = 0;

    while (1)
    {
        LOG(LOG_LVL_ERROR, "temp cal task count = %d\r\n", count++);
        OS_MsDelay(500);
    }
}

void creat_usr_app_task(void)
{
    if(OS_OK != OS_ThreadCreate(&g_usr_app_thread, "usr_app", usr_app_task_entry, NULL, OS_PRIORITY_BELOW_NORMAL, USR_APP_TASK_STACK_SIZE)) {
        ART_ASSERT(1);
    }

    if(OS_OK != OS_ThreadCreate(&g_temp_cal_thread, "temp_cal", temp_cal_app_task_entry, NULL, OS_PRIORITY_BELOW_NORMAL, TEMP_APP_TASK_STACK_SIZE)) {
        ART_ASSERT(1);
    }
}



